fix(mail): observe toolbar width changes#1834
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ad81055f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| this.toolbarResizeObserver = new ResizeObserver(() => { | ||
| this.calculateWidthDependentElements(); | ||
| }); |
There was a problem hiding this comment.
Run toolbar resize callback inside Angular zone
The new ResizeObserver callback updates morebuttonindex/attachmentAreaCols directly, but this app does not import the Zone.js ResizeObserver patch (src/polyfills.ts only imports zone.js). In this setup, ResizeObserver callbacks can run outside Angular change detection, so toolbar state changes after a resize may not render until some unrelated UI event triggers another check. Wrap the callback in NgZone.run(...) (or explicitly patch ResizeObserver) so width-driven toolbar updates are reliably reflected immediately.
Useful? React with 👍 / 👎.
Fixes #1656.
Summary
Tests
AI use disclosure